package cfdt.ldl.signatrue.util;

import cfca.sadk.org.bouncycastle.crypto.digests.SM3Digest;

public class Sm3Utils {

    private Sm3Utils() {

    }

    /**
     * 考虑修改为HMacUtil中的方法，这里用的CFCA的工具包
     * @param srcData
     * @return
     */
    @Deprecated
    public static byte[] hash(byte[] srcData) {
        SM3Digest digest = new SM3Digest();
        digest.update(srcData, 0, srcData.length);
        byte[] hash = new byte[digest.getDigestSize()];
        digest.doFinal(hash, 0);
        return hash;
    }
}
